import APIClient from "../network/index"
// 砍价状态请求
const shopListModule = {
    state: {
        listItems: []
    },
    mutations: {
        getGoodsList(state, items) {
            state.listItems = items;
        }
    },
    actions: {
        getGoodsList(context) {
            APIClient.getShopList()
                .then(res => {
                    //检测
                    console.log(res.data.data);
                    //赋值
                    context.commit("getGoodsList", res.data.data)
                })
                .catch(error => {
                    console.log(error);
                });
        }
    },
    modules: {

    }
}

export default shopListModule